# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: wrapper_func.py
@time: 2021/02/05
"""


def decorator(cls):
    ...

    class Wrapper:
        def __init__(self, *args, **kwargs):
            self.wrapper = cls(*args, **kwargs)

        def __getattr__(self, item):
            return getattr(self.wrapper, item)

    return Wrapper


@decorator
class Person:
    ...
    def __init__(self, name, age):
        self.name = name
        self.age = age


if __name__ == '__main__':
    pass
    person = Person(name='zhangsan', age=21)
    print(person.name)
